#include <QApplication>
#include "lgraph.h"
#include "mgraph.h"
#include <QInputDialog>
#include <QDebug>
#include "choosepanel.h"
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    bool ok=false;
    int result;
    while(true)
    {
        int input;
        int storage;
        int num;
        ChoosePanel * choPan=new ChoosePanel(&input,&num,&storage,&ok);
        choPan->exec();
        delete choPan;
        if(!ok)
        return 0;
        Graph *w;
        if(storage==0)  //如果选择了邻接矩阵存储
        {
            w=new MGraph(0,num,input);
        }
        else
        {
            w=new LGraph(0,num,input);
        }
        w->show();
        result=a.exec();
        delete w;
    }

    return result;
}
